home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / lib / fred.g < prev    next >
Encoding:
Text File  |  1996-04-04  |  4.5 KB  |  206 lines  |  [TEXT/XCNQ]

  1. (game-module "fred"
  2.   ;; This is not a standalone game, has only a test setup defined.
  3.   (title "Frederick")
  4.   (blurb "Type definitions for games set during the Seven Years War")
  5.   (variants (world-size (45 30 1000)))
  6. )
  7.  
  8. (set see-all true) ; for debugging
  9.  
  10. (unit-type army (image-name "soldiers"))
  11. (unit-type general (image-name "flag"))
  12. (unit-type marshal (image-name "flag"))
  13. (unit-type prince (image-name "flag"))
  14. (unit-type king (image-name "crown"))
  15. (unit-type depot (image-name "walltown"))
  16. (unit-type town (image-name "town20"))
  17. (unit-type fortress (image-name "fortress"))
  18.  
  19. (material-type supplies (help "generic supplies"))
  20.  
  21. (terrain-type sea (color "sky blue") (char "."))
  22. (terrain-type countryside (color "green") (char "+") (image-name "countryside"))
  23. (terrain-type swamp (color "yellow green") (char "="))
  24. (terrain-type forest (color "forest green") (char "%")) ; no longer used?
  25. (terrain-type hills (color "khaki") (char ">")) ; no longer used
  26. (terrain-type mountains (color "sienna") (char "^"))
  27. (terrain-type river (color "blue") (subtype border))
  28. (terrain-type barrier (color "sienna") (image-name "mountains") (subtype border))
  29. (terrain-type pass (color "gray") (image-name "road") (subtype connection))
  30.  
  31. (define land (countryside swamp forest hills mountains))
  32. (define cell-t* (sea countryside swamp forest hills mountains))
  33. (define leader (general marshal prince king))
  34. (define bases (depot town fortress))
  35.  
  36. ;;; Static relationships.
  37.  
  38. (table vanishes-on
  39.   ;; No navy in this game.
  40.   (u* sea true)
  41.   )
  42.  
  43. ;;; Armies carry leaders around and are propelled by them.
  44.  
  45. (add army capacity 1)
  46. (add bases capacity 10)
  47.  
  48. (table unit-size-as-occupant
  49.   (u* u* 100)  ; disables capacity by default
  50.   (army bases 1)
  51.   (leader army 1)  ; army can only have one commander
  52.   (leader bases 0)
  53.   )
  54.  
  55. ;;; Leaders can carry each other around, higher ranks "carrying" lower.
  56.  
  57. (table unit-capacity-x
  58.   (king (general marshal prince) 4)
  59.   (prince (general marshal) 3)
  60.   (marshal (general) 2)
  61.   )
  62.  
  63. (table unit-size-in-terrain
  64.   (u* t* 0)
  65.   ;; (need to limit armies?)
  66.   )
  67.  
  68. (table unit-storage-x
  69.   (army supplies 100)
  70.   (bases supplies 1000)
  71.   )
  72.  
  73. ;;; Actions.
  74.  
  75. (add army acp-per-turn 1)
  76. (add leader acp-per-turn 6)
  77. (add bases acp-per-turn 0)
  78.  
  79. (table acp-occupant-effect
  80.   ;; Leaders "get the lead out", accelerate the army.
  81.   (leader army 600)
  82.   )
  83.  
  84. ;;; Movement.
  85.  
  86. (table mp-to-enter-terrain
  87.   (u* sea 99)
  88.   ;; Crossing rivers is hard for armies.
  89.   (army river 1)
  90.   (army barrier 99)
  91.   (leader barrier 99)
  92. )
  93.  
  94. (table mp-to-traverse
  95.   (army pass 1 #|2|#)
  96.   )
  97.  
  98. (add army free-mp 1)
  99.  
  100. ;; 5 s supply-line
  101.  
  102. ;;; Construction.
  103.  
  104. (add depot cp 6)
  105.  
  106. (table acp-to-create (army depot 1))
  107.  
  108. (table acp-to-build (army depot 1))
  109.  
  110. ;;; Combat.
  111.  
  112. (add army hp-max 80)
  113.  
  114. ;(table acp-to-attack
  115. ;  )
  116.  
  117. (table hit-chance
  118.   (army army 50)
  119.   (army leader 50)
  120.   )
  121.  
  122. (table damage
  123.   (army army 1d4)
  124.   (army leader 1)
  125.   )
  126.  
  127. ;;; Leaders should be able to retreat from hits.
  128.  
  129. (table acp-to-capture
  130.   (army army 1)
  131.   (army leader 1)
  132.   (army bases 1)
  133.   )
  134.  
  135. (table capture-chance
  136.   ;; implausible for small units capturing large
  137.   (army army 25)
  138.   (army leader 100)
  139.   (army bases 100)
  140.   )
  141.  
  142. ;;; Garrisons prevent immediate capture.
  143.  
  144. (table protection
  145.   (army fortress 10)
  146.   )
  147.  
  148. ;;; Need a surrender chance for depots vs fortresses.
  149.  
  150. ;;; Backdrop.
  151.  
  152. ;;; Scoring.
  153.  
  154. (add u* point-value 0)
  155. (add fortress point-value 1)
  156.  
  157. ;;; Seasons.
  158.  
  159. (world (year-length 24))
  160.  
  161. (set calendar '(usual "month" 1 2))
  162.  
  163. (set season-names
  164.   ((0 6 "winter") (7 11 "spring") (12 17 "summer") (18 23 "autumn")))
  165.  
  166. ;;; Random generation; should be for testing only.
  167.  
  168. (add cell-t* alt-percentile-min (  0  70  30  20  90  95))
  169. (add cell-t* alt-percentile-max ( 20  90  31  90  95 100))
  170. (add cell-t* wet-percentile-min (  0  50  50   0   0   0))
  171. (add cell-t* wet-percentile-max (100 100 100 100 100 100))
  172.  
  173. (set edge-terrain mountains)
  174.  
  175. (add u* start-with 1)  ; one of everything
  176.  
  177. (table favored-terrain
  178.   (u* t* 0)
  179.   (u* countryside 100)
  180.   )
  181.  
  182. ;;; Always max out at a 9-month campaign season.
  183.  
  184. (set last-turn 18)
  185.  
  186. (game-module (notes (
  187.   "This is a game about the Seven Years War in central Europe.  The number of unit types"
  188.   "is small, and there are only a few special characteristics.  The game"
  189.   "is basically one of maneuvering for position, since combat was mostly"
  190.   "ineffective."
  191.   ""
  192.   "Map scale is 15 miles/cell, time is 2 weeks/turn."
  193.   ""
  194.   )))
  195.  
  196. (game-module (design-notes (
  197.   "A number of items remain to be developed:"
  198.   ""
  199.   "Disable free moves and make combat cost high, to simulate the mutual"
  200.   "consent to combat."
  201.   ""
  202.   "Supply paths (about 4-5 cells)."
  203.   ""
  204.   "River effect on combat."
  205.   )))
  206.